<script>
    document.title = "{{Title}}" + " - 注册";
</script>
{{> views/help/prepare}}
{{> views/help/messagebox}}

<form action="/new" method="get">
    <div class="mb-3">
      <label for="user" class="form-label">账号</label>
      <input type="text" class="form-control" id="user" name="user" required>
    </div>
    <div class="mb-3">
      <label for="password" class="form-label">密码</label>
      <input type="password" class="form-control" id="password" name="password" required>
    </div>
    <div class="mb-3">
        <label for="email" class="form-label">邮箱</label>
        <input type="email" class="form-control" id="email" name="email" required>
    </div>
    <button type="submit" class="btn btn-primary">注册</button>
</form>

<div class="modal fade" id="EnsureModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="EnsureModalLabel" aria-hidden="true">
    <div class="modal-dialog">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="EnsureModalLabel">注册须知</h5>
        </div>
        <div class="modal-body">
          {{{EnsureToKnow}}}
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onclick="window.location.href='/login';">取消</button>
          <button type="button" class="btn btn-primary" onclick="EnsureModal.hide()">我知道了</button>
        </div>
      </div>
    </div>
</div>
<script>
    var EnsureModal = new bootstrap.Modal($("#EnsureModal"));
    EnsureModal.show();
</script>